﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using WXDba.Entity;
namespace WXDba.Abstract
{
    /// <summary>
    /// 用户分组接口
    /// </summary>
    public interface IUserGroup : IBaseAbstract<UserGroup>
    {
        #region 扩展接口
        /// <summary>
        /// 获取指定分组的用户数量
        /// </summary>
        /// <param name="ID">主键ID</param>
        /// <returns></returns>
        int GetUserCount(int ID);
        /// <summary>
        /// 清空本地分组
        /// </summary>
        /// <returns></returns>
        bool Clear();
        /// <summary>
        /// 重新替换分组
        /// </summary>
        /// <param name="groups">分组列表</param>
        /// <returns></returns>
        bool Replace(List<UserGroup> groups);
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <returns></returns>
        List<UserGroup> GetList();
        /// <summary>
        /// 修改本地分组名称
        /// </summary>
        /// <param name="ID">分组ID</param>
        /// <param name="Name">分组名称</param>
        /// <returns></returns>
        bool UpdateName(int ID, string Name);
        #endregion

        #region 获取数量
        int GetCount();
        #endregion
    }
}
